<?php

defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.controller');

require_once(JPATH_COMPONENT.DS.'helpers'.DS.'webide.php');

class WebideController extends JController {

	public function display($cachable = false, $urlparams = false) {
		JRequest::setVar('view', 'options');
		JRequest::setVar('template', 'default');
		parent::display();
		return $this;
	}
	public function browse($cachable = false, $urlparams = false) {
		JRequest::setVar('view', 'files');
		parent::display();
		return $this;
	}
	public function add($cachable = false, $urlparams = false) {
		JRequest::setVar('view', 'option');
		parent::display();
		return $this;
	}
	public function sampletask() {
		echo "Browse TASK on controller";
		//$files = $this->getModel('Files');
		//if ($view == 'browse') {
		//	echo "display on brower view!";
			/*$this->setError('err');
			$this->setMessage($this->getError(), 'error');*/
			//return false;
		//}
		//$this->setRedirect(JRoute::_('index.php?option=com_webide&view=browse', false));				
		parent::display();
		return $this;
	}
}
?>